<% form_for @search, :url => admin_contacts_path(:contact => params[:search]),
  :html => {:id => 'search'} do |f| %>
  <table>
    <% f.fields_for @search.conditions do |mail| %>
      <tr>
        <td style="width:100px;text-align:right;">
          <span>关键字</span>
        </td>
        <td>
          <%= text_field_tag :keyword,params[:keyword],:size => 20 %>
        </td>
        <td  style="width:100px;text-align:right;">
          <span><%= Contact.human_attribute_name("created_at") %>:</span>
        </td>
        <td>
          <%= mail.calendar_date_select :created_at_gte,:size => 16,:time =>true ,:year_range=>Time.now.year..Time.now.next_year.year,:popup=>:force,:style=>"margin-right:0px" %>~
          <%= mail.calendar_date_select :created_at_lte,:size => 16,:time =>true ,:year_range=>Time.now.year..Time.now.next_year.year,:popup=>:force,:style=>"margin-right:0px"%>
        </td>
      </tr>
      <tr>
        <td>
        </td>
        <td>
        </td>
        <td>
        </td>
        <td>
          <%= hidden_field_tag :per_page, params[:per_page] || 50 %>
          <%= f.submit t('labels.search'), :class => "btn_s float_right" %>
        </td>
      </tr>

    <% end %>
  </table>
  <br class="clear"/>
<% end %>